/**
 * 
 */
package cn.tonyqiu.wonuly.service.impl;

import cn.tonyqiu.wonuly.dao.UserDao;
import cn.tonyqiu.wonuly.model.User;
import cn.tonyqiu.wonuly.service.UserManager;
import cn.tonyqiu.wonuly.service.util.UserServiceUtil;

/**
 * @author <a href="mailto:tony.qiu.smart@gmail.com">Tony Qiu</a>
 *
 */
public class UserManagerImpl extends GenericManagerImpl<User, Integer> implements UserManager{

	private UserDao userDao;
	
	/* (non-Javadoc)
	 * @see cn.tonyqiu.wonuly.service.UserManager#getUserByEmail(java.lang.String)
	 */
	@Override
	public User getUserByEmail() {
		String email = UserServiceUtil.getUserEmail();
		User user = userDao.getUserByEmail(email);
		return user;
	}

	/**
	 * @return the userDao
	 */
	public UserDao getUserDao() {
		return userDao;
	}

	/**
	 * @param userDao the userDao to set
	 */
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

}
